package com.ruoyi.file.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("file_info")
@ApiModel(value="FileInfo对象", description="文件信息")
public class FileInfo implements Serializable {

    private static final long serialVersionUID = 1L;
    @Excel(name = "文件信息编号", type = Excel.Type.ALL, cellType = Excel.ColumnType.NUMERIC, prompt = "文件信息编号")
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Excel(name = "文件编码")
    @ApiModelProperty(value = "文件编码")
    private String code;
    @Excel(name = "文件名")
    @ApiModelProperty(value = "文件名")
    private String newFileName;
    @Excel(name = "文件存储路径")
    @ApiModelProperty(value = "文件存储路径")
    private String url;
//    @ApiModelProperty(value = "文件大小（字节）")
//    private Long fileSize;
//    @ApiModelProperty(value = "文件MIME类型")
//    private String fileType;
//    @ApiModelProperty(value = "Minio存储桶名称")
//    private String bucketName;
//    @ApiModelProperty(value = "文件MD5值（用于去重校验）")
//    private String fileMd5;
//    @ApiModelProperty(value = "文件分类（如：image, video, document等）")
//    private String fileCategory;
    @Excel(name = "业务类型")
    @ApiModelProperty(value = "业务类型（关联的业务模块）")
    private String businessType;
    @Excel(name = "备注信息")
    @ApiModelProperty(value = "备注信息")
    private String remark;
//    @ApiModelProperty(value = "文件状态")
//    private Integer fileStatus;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "数据所属单位")
    private Long deptId;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建日期" , width = 30, dateFormat = "yyyy-MM-dd  HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人")
    private String createBy;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "修改人")
    private String updateBy;
    @TableLogic
    @ApiModelProperty(value = "删除标记")
    private String delFlag;

}
